package sy.pageModel;

import java.util.LinkedHashMap;
import java.util.Map;

public class OrderDoctor {
	
	public final static String ORDER_STATUS_ID_WAIT_ACCEPT = "01";
	public final static String ORDER_STATUS_ID_ACCEPTED = "02";
	public final static String ORDER_STATUS_ID_WAIT_CONFIRM_DETAILS = "03";
	public final static String ORDER_STATUS_ID_SERVICING = "04";
	public final static String ORDER_STATUS_ID_WAIT_CONFIRM_SERVICE = "05";
	public final static String ORDER_STATUS_ID_SERVICE_DONE = "06";
	public final static String ORDER_STATUS_ID_CANCELLED = "07";
	
	public final static Map<String, String> ORDER_STATUS_MAP = new LinkedHashMap<String, String>();
	
	static {
		ORDER_STATUS_MAP.put(ORDER_STATUS_ID_WAIT_ACCEPT, "等待接单");
		ORDER_STATUS_MAP.put(ORDER_STATUS_ID_ACCEPTED, "已接单（明细生成中）");
		ORDER_STATUS_MAP.put(ORDER_STATUS_ID_WAIT_CONFIRM_DETAILS, "明细已生成（等待客户确认）");
		ORDER_STATUS_MAP.put(ORDER_STATUS_ID_SERVICING, "服务中");
		ORDER_STATUS_MAP.put(ORDER_STATUS_ID_WAIT_CONFIRM_SERVICE, "服务完成（等待客户确认）");
		ORDER_STATUS_MAP.put(ORDER_STATUS_ID_SERVICE_DONE, "服务结束");
		ORDER_STATUS_MAP.put(ORDER_STATUS_ID_CANCELLED, "订单已取消");
	}
	
	private int page;
	private int rows;
	private String sort;
	private String order;
	private String ids;
	private String createTimeStart;
	private String createTimeEnd;
	
	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}

	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public String getOrder() {
		return order;
	}

	public void setOrder(String order) {
		this.order = order;
	}

	public String getIds() {
		return ids;
	}

	public void setIds(String ids) {
		this.ids = ids;
	}
	
	public String getCreateTimeStart() {
		return createTimeStart;
	}

	public void setCreateTimeStart(String createTimeStart) {
		this.createTimeStart = createTimeStart;
	}
	
	public String getCreateTimeEnd() {
		return createTimeEnd;
	}

	public void setCreateTimeEnd(String createTimeEnd) {
		this.createTimeEnd = createTimeEnd;
	}
	
	private String id = "";
	private String orderId = "";
	private String cardId = "";
	private String name = "";
	private String status = "";
	private String mobile = "";
	private String createTime = "";
	private String gender = "";
	private String cid = ""; //身份证号
	private String bornDate = ""; //出生日期
	private String contact = ""; //紧急联系人
	private String contactMobile = ""; //联系人手机号
	private String address = ""; //联系地址
	private String hospital = ""; //医疗机构
	private String department = ""; //科室
	private String serviceItems = ""; //服务项目
	private String requirement = "";  //具体需求
	private String serviceTime = ""; //服务时间
	private String isUrgent = ""; //是否紧急
	private double estimateFee;  //预估费用
	private double actualFee;    //实际费用
	private String serviceDetails; //服务详单
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}
	
	public String getCardId() {
		return cardId;
	}

	public void setCardId(String cardId) {
		this.cardId = cardId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getStatus() {
		return this.status;
	}
	
	public String getStatusName() {
		return ORDER_STATUS_MAP.get(status);
	}
	
	public void setStatus(String status) {
		this.status = status;
	}
	
	public String getMobile() {
		return mobile;
	}
	
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	public String getCreateTime() {
		return createTime;
	}
	
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	
	public String getGender() {
		return this.gender;
	}
	
	public String getGenderName() {
		return Member.MEMBER_GENDER_MAP.get(gender);
	}
	
	public void setGender(String gender) {
		this.gender = gender;
	}
	
	public String getCid() {
		return cid;
	}
	
	public void setCid(String cid) {
		this.cid = cid;
	}
	
	public String getBornDate() {
		return bornDate;
	}
	
	public void setBornDate(String bornDate) {
		this.bornDate = bornDate;
	}
	
	public String getContact() {
		return contact;
	}
	
	public void setContact(String contact) {
		this.contact = contact;
	}
	
	public String getContactMobile() {
		return contactMobile;
	}
	
	public void setContactMobile(String contactMobile) {
		this.contactMobile = contactMobile;
	}
	
	public String getAddress() {
		return address;
	}
	
	public void setAddress(String address) {
		this.address = address;
	}
	
	public String getHospital() {
		return hospital;
	}
	
	public void setHospital(String hospital) {
		this.hospital = hospital;
	}
	
	public String getDepartment() {
		return department;
	}
	
	public void setDepartment(String department) {
		this.department = department;
	}
	
	public String getServiceItems() {
		return serviceItems;
	}
	
	public void setServiceItems(String serviceItems) {
		this.serviceItems = serviceItems;
	}
	
	public String getRequirement() {
		return requirement;
	}
	
	public void setRequirement(String requirement) {
		this.requirement = requirement;
	}
	
	public String getServiceTime() {
		return serviceTime;
	}
	
	public void setServiceTime(String serviceTime) {
		this.serviceTime = serviceTime;
	}
	
	public String getIsUrgent() {
		return isUrgent;
	}
	
	public void setIsUrgent(String isUrgent) {
		this.isUrgent = isUrgent;
	}
	
	public double getEstimateFee() {
		return estimateFee;
	}
	
	public void setEstimateFee(double estimateFee) {
		this.estimateFee = estimateFee;
	}
	
	public double getActualFee() {
		return actualFee;
	}
	
	public void setActualFee(double actualFee) {
		this.actualFee = actualFee;
	}
	
	public String getServiceDetails() {
		return serviceDetails;
	}
	
	public void setServiceDetails(String serviceDetails) {
		this.serviceDetails = serviceDetails;
	}
	
	public String getIsUrgentName() {
		return "Y".equals(this.isUrgent) ? "是" : "否";
	}
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("id='" + id + "', ");
		sb.append("cardId='" + cardId + "', ");
	    sb.append("name='" + name + "', ");
	    sb.append("status='" + status + "', ");
	    sb.append("statusName='" + this.getStatusName() + "', ");
	    sb.append("mobile='" + mobile + "', ");
	    sb.append("orderId='" + orderId + "', ");
	    sb.append("contact='" + contact + "', ");
	    sb.append("contactMobile='" + contactMobile + "', ");
	    sb.append("createTime='" + createTime + "', ");
	    sb.append("gender='" + gender + "', ");
	    sb.append("genderName='" + this.getGenderName() + "', ");
	    sb.append("cid='" + cid + "', ");
	    sb.append("bornDate='" + bornDate + "', ");
	    sb.append("hospital='" + hospital + "', ");
	    sb.append("department='" + department + "', ");
	    sb.append("serviceTime='" + serviceTime + "', ");
	    sb.append("serviceItems='" + serviceItems + "', ");
	    sb.append("address='" + address + "', ");
	    sb.append("requirement='" + requirement + "', ");
	    sb.append("estimateFee='" + estimateFee + "', ");
	    sb.append("actualFee='" + actualFee + "', ");
	    sb.append("serviceDetails='" + serviceDetails + "', ");
	    sb.append("isUrgent='" + isUrgent + "'");
	    return sb.toString();		
	}
}
